#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include "SqStack.hpp"
#include <string>
using namespace std;

class Hero
{
public:
	Hero(int id, const char* name)
	{
		this->id = id;
		this->name = name;
	}
	int id;
	string name;
};
int main()
{
	SqStack<Hero*> stk;
	Hero h1(1, "zhang");
	Hero h2(2, "li");
	stk.push(&h1);
	stk.push(&h2);
	stk.pop();
	try
	{
		//stk.push(NULL);
		cout << stk.top()->name << endl;
		cout << stk.size() << endl;
	}
	catch (std::exception& ex)
	{
		cout << ex.what() << endl;
	}
	return 0;
}